<#include "../inc/head.ftl"/>
		<script type="text/javascript" src="${project_url}/common/js/admins/common_script.js?ver=201611082136"></script>
	</head>
<body>
   <title>修改</title>

</head>
<body>
	<div style="text-align:center;margin-left: 110px;margin-top: 30px;">
		 <form id="ff" method="post">
	    	<table cellpadding="5">
	    		<tr>
	    			<td><span style="font-size:16px;">昵称:</span></td>
	    			<td>
	    				<input class="easyui-textbox" type="text" id="user_name" name="user_name" value="${dto.user_name}" style="width:250px;height:32px;"></input>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td><span  style="font-size:16px;">密码:</span></td>
	    			<td>
	    				<input class="easyui-textbox" type="text" id="user_pwd" name="user_pwd" style="width:250px;height:32px;"></input>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td><span style="font-size:16px;">手机号:</span></td>
	    			<td>
	    				<input class="easyui-textbox" type="text" id="mobile" name="mobile" value="${dto.mobile!}" style="width:250px;height:32px;"></input>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td><span style="font-size:16px;">等级:</span></td>
	    			<td>
	    				<select class="easyui-combobox js-search" panelHeight="auto" style="width:250px;height:32px;" name="group_id">
				        	<#list groups as item>
				        		<option value="${item.id}" <#if dto.id==item.id>selected="selected"</#if>>${item.name}</option>
				        	</#list>
				        </select>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td><span style="font-size:16px;">状态:</span></td>
	    			<td>
	    				<select class="easyui-combobox js-search" panelHeight="auto" style="width:250px;height:32px;" name="is_effect">
				        	<option value="1" <#if dto.is_effect==1>selected="selected"</#if>>有效</option>
							<option value="0" <#if dto.is_effect==0>selected="selected"</#if>>无效</option>
				        </select>
	    			</td>
	    		</tr>
	    		<input type="hidden" name="id" value="${id}" style="width:250px;height:32px;"></input>
	    			
	    	</table>
	    </form>
	</div>
    <div style="text-align:center;padding:5px;font-size:18px;">
    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">确认</a>
    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()">重置</a>
    </div>
<script type="text/javascript">
	function submitForm(){
		var flag = true;
		if($("#user_name").val()==""){
			slide_message("请输入昵称");
			flag = false;
			return;
		}
		
		if($("#mobile").val()==""){
			slide_message("请输入手机");
			flag = false;
			return;
		}
		
		
		
		if(flag){
		
			var url = module_url+"/update.do";
			var data = $("#ff").serialize();
			$.ajax({
				url:url,
				type:'post',
				dataType:"json",
				data:data,
				success:function(rs){
					if(rs.err_code==-1){
						slide_message(rs.err_msg);
						$('#win').window('close');
						$('#tt').datagrid('load'); 
					}else{
						slide_message(rs.err_msg);
					}
				}
			});
		
		}
	}
	function clearForm(){
		$('#ff').form('clear');
	}
	
</script>
<#include "../inc/foot.ftl"/>